﻿	var renderTask = function(value, metaData, record) {
		if(value == '7'){//发送失败
			var color = 'red';
		}
		if(value == '1'){//发送中
			
            var color = 'blue';
		}
        if(value == '2'){//发送成功
			
            var color = 'green';
		}
		var title = value || '';
		var cbo = Jxstar.findComboData('wxmsgstate');
		for (var i = 0; i < cbo.length; i++) {
			if (cbo[i][0] == value) {
				title = cbo[i][1]; break;
            }
		}
		
		var html = '<span style="color:'+ color +'; font-weight:bold;">'+ title +'</span>';
		return html;
	};
	
	for (var i = 0; i < cols.length; i++) {
		if (cols[i].field&&cols[i].field.name.indexOf('__msg_state') > 0  ) {
			cols[i].col.renderer = renderTask;break;
		}
	}